package com.yumeko.zkclient;

import org.I0Itec.zkclient.ZkClient;

/**
 * @program: zookeeper
 * @description:
 * @author: Zheng Hao
 * @create: 2020-03-26 14:09
 */
public class DeleteNode {
    public static void main(String[] args) {
        ZkClient zkClient = new ZkClient("192.168.106.128:2183", 3000, 5000);
        //递归删除子节点
        zkClient.deleteRecursive("/RecursiveCreate/yumeko");
        //删除此节点
        zkClient.delete("/RecursiveCreate");
        //判断节点是否存在
        System.out.println(zkClient.exists("/RecursiveCreate/yumeko"));
    }
}
